from APP.common.schema import SchemaBase
from typing import Optional,List, Any, Dict
from pydantic import Field 
from APP.app.userprofile.schemas.tag_schema import TagType,TagCategory


class ProfileResponseSchema(SchemaBase):

    success: bool = Field(...,description='请求是否成功')
    profile:Optional[dict] = Field(None,description='人才画像')
    message:str = Field(description='响应消息')

class UserTag(SchemaBase):
    tag_id: str
    name: str
    value: Any
    category: TagCategory
    tag_type: TagType
    confidence: float
    source: str
    metadata: Optional[Dict[str, Any]]

class UserProfileSchema(SchemaBase):
    """
     获取用户所有画像模型
     包含显示和隐式指标
    """
    user_id:str = Field(...,description='用户ID')
    tags:List[UserTag] = Field(default_factory=list,description='用户标签')
    # emotions:List[UserEmotion] = Field(default_factory=list,description='用户情绪')
    # intents:List[UserIntent] = Field(default_factory=list,description='用户意图')
    segments:List[str] = Field(default_factory=list,description='用户分群ID列表')

